package com.lyx.server.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.lyx.common.vo.R;
import com.lyx.server.dao.UserKickbackDao;
import com.lyx.server.entity.UserKickback;
import com.lyx.server.service.UserKickbackService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * --- Be Humble and Hungry ---
 *
 * @author McMeloxD
 * @date 2024/8/12
 * @desc
 */
@Service("userKickbackServive")
public class UserKickbackServiceImpl implements UserKickbackService {

    @Resource
    private UserKickbackDao dao;
    @Override
    public R queryByUid(Integer uid) {
        return R.ok(dao.selectList(new LambdaQueryWrapper<UserKickback>().eq(UserKickback::getUid,uid).orderByDesc(UserKickback::getCreateTime)));
    }
}
